package com.yy.pojo.base;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.util.Date;

/**
 * t_questions
 */
public class TQuestions {
    /**
     * t_questions.id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 试题内容
     * <p>
     * t_questions.content
     */
    private String content;

    /**
     * 题型 1.单选 2.多选
     * <p>
     * t_questions.type
     */
    private Integer type;

    /**
     * 选项，选项与选项之间以{*}分隔
     * <p>
     * t_questions.options
     */
    private String options;

    /**
     * 正确定答案，多选答案以逗号分隔
     * <p>
     * t_questions.success_answer
     */
    private String success_answer;

    /**
     * t_questions.create_date
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date create_date;

    /**
     * t_questions.update_date
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date update_date;

    /**
     * t_questions.id
     *
     * @return t_questions.id
     */
    public Long getId() {
        return id;
    }

    /**
     * t_questions.id
     *
     * @param id t_questions.id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 试题内容
     * t_questions.content
     *
     * @return t_questions.content
     */
    public String getContent() {
        return content;
    }

    /**
     * 试题内容
     * t_questions.content
     *
     * @param content t_questions.content
     */
    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    /**
     * 题型 1.单选 2.多选
     * t_questions.type
     *
     * @return t_questions.type
     */
    public Integer getType() {
        return type;
    }

    /**
     * 题型 1.单选 2.多选
     * t_questions.type
     *
     * @param type t_questions.type
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * 选项，选项与选项之间以{*}分隔
     * t_questions.options
     *
     * @return t_questions.options
     */
    public String getOptions() {
        return options;
    }

    /**
     * 选项，选项与选项之间以{*}分隔
     * t_questions.options
     *
     * @param options t_questions.options
     */
    public void setOptions(String options) {
        this.options = options == null ? null : options.trim();
    }

    /**
     * 正确定答案，多选答案以逗号分隔
     * t_questions.success_answer
     *
     * @return t_questions.success_answer
     */
    public String getSuccess_answer() {
        return success_answer;
    }

    /**
     * 正确定答案，多选答案以逗号分隔
     * t_questions.success_answer
     *
     * @param success_answer t_questions.success_answer
     */
    public void setSuccess_answer(String success_answer) {
        this.success_answer = success_answer == null ? null : success_answer.trim();
    }

    /**
     * t_questions.create_date
     *
     * @return t_questions.create_date
     */
    public Date getCreate_date() {
        return create_date;
    }

    /**
     * t_questions.create_date
     *
     * @param create_date t_questions.create_date
     */
    public void setCreate_date(Date create_date) {
        this.create_date = create_date;
    }

    /**
     * t_questions.update_date
     *
     * @return t_questions.update_date
     */
    public Date getUpdate_date() {
        return update_date;
    }

    /**
     * t_questions.update_date
     *
     * @param update_date t_questions.update_date
     */
    public void setUpdate_date(Date update_date) {
        this.update_date = update_date;
    }

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}